package com.example.shilehui;

import cn.jhc.utils.Strings;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.ImageView;
import android.widget.TextView;

public class HelpTopicContentActivity extends Activity {
	
	 private String _fullContent; 
	 private TextView _titleTextView;
	 private ImageView _backImageView;
	 private TextView _titleRightTextView;
	 private ImageView _titleRightImageView;
	 @Override
	 public void onCreate(Bundle savedInstanceState) {
	     super.onCreate(savedInstanceState);
	     
	     requestWindowFeature(Window.FEATURE_NO_TITLE);
	     setContentView(R.layout.help_topic_content_layout);
	     
	     Intent intent=getIntent();
	     _fullContent=intent.getStringExtra(Strings.HELP_TOPIC_CONTENT);
	     
	     TextView textView=(TextView)findViewById(R.id.ht_full_content_textview);
	     textView.setText(_fullContent);
	     setTitle();
	     
	 }
	 
	 private void setTitle(){
		 _titleTextView=(TextView)findViewById(R.id.title_middle);
		 _backImageView=(ImageView)findViewById(R.id.title_left_imageview);
		 _titleRightTextView=(TextView)findViewById(R.id.title_right_textview);
		 _titleRightImageView=(ImageView)findViewById(R.id.title_right_imageview);
		 
		 
		 _titleTextView.setText(R.string.ht_content_title);
		 _titleTextView.setTextColor(Color.WHITE);
		 _titleTextView.setTextSize(18);
		 _titleTextView.setGravity(Gravity.CENTER);
		 
		 
		 _backImageView.setImageResource(R.drawable.left_icon);
		 _backImageView.setOnClickListener(new onViewClickListener());
		 _titleRightImageView.setVisibility(View.GONE);
		 _titleRightTextView.setVisibility(View.GONE);
	 }
	 
	 private class onViewClickListener implements OnClickListener{

		@Override
		public void onClick(View v) {
			switch(v.getId()){
				case R.id.title_left_imageview:
					finish();
					break;
			}
			
		}
		 
	 }
}
